/*
 *NOTE:Auto generated service implement
*/
package com.surfilter.modules.com.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Service;

import com.surfilter.modules.com.model.ComStatModel;
import com.surfilter.modules.com.model.HtComModel;
import com.surfilter.modules.com.model.HtBuildModel;
import com.surfilter.modules.com.model.HtPropModel;
import com.surfilter.modules.com.dao.HtComDao;
import com.surfilter.modules.com.dao.HtBuildDao;
import com.surfilter.modules.com.dao.HtPropDao;
import com.surfilter.modules.com.service.ComMgrService;
import com.surfilter.platform.base.model.ActionPermission;
import com.surfilter.platform.base.model.PageInfo;
import com.surfilter.platform.base.model.ParameterClassType;
import com.surfilter.platform.base.model.ParameterInfo;
import com.surfilter.platform.base.model.ParameterMapper;
import com.surfilter.platform.base.model.PermissionMethodType;
import com.surfilter.platform.base.service.ServiceBase;
import com.surfilter.platform.base.util.ParaUtil;

@Service(value = "comMgrService")
public class ComMgrServiceImpl extends ServiceBase implements ComMgrService {

	@Resource
	private HtComDao htComDao;
	@Resource
	private HtBuildDao htBuildDao;
	@Resource
	private HtPropDao htPropDao;

	
	@ActionPermission(actionName = "addHtCom",remark = "")
	public java.lang.Integer addHtCom(HtComModel htComModel, HttpServletRequest request) {
		return htComDao.addHtCom(htComModel);
	}
	
	@ActionPermission(actionName = "chgHtCom",remark = "")
	public void chgHtCom(HtComModel htComModel, HttpServletRequest request) {
		htComDao.chgHtCom(htComModel);
	}
	
	@ActionPermission(actionName = "delHtCom",remark = "")
	public void delHtCom(HtComModel htComModel, HttpServletRequest request) {
		htComDao.delHtCom(htComModel);
	}
	@ActionPermission(actionName = "chgComBasic",remark = "",permission=PermissionMethodType.MODULE)
	public void chgComBasic(HtComModel htComModel, HttpServletRequest request){
		if(htComModel.getId() != null){
			htComDao.chgComBasic(htComModel);
		}
	}
	@ActionPermission(actionName = "chgComInfo",remark = "",permission=PermissionMethodType.MODULE)
	public void  chgComInfo(HtComModel htComModel, HttpServletRequest request){
		if(htComModel.getId() != null){
			htComDao.chgComInfo(htComModel);
		}
	}
	
	@ActionPermission(actionName = "getHtComs",remark = "")
	public List<HtComModel> getHtComs(HtComModel htComModel, HttpServletRequest request) {
		return htComDao.getHtComs(htComModel, PageInfo.getPageInfo(request));
	}
	
	@ActionPermission(actionName = "getHtComById",remark = "",permission=PermissionMethodType.MODULE)
	public HtComModel getHtComById( HttpServletRequest request) {
		Integer id = ParaUtil.getPara(request, "id", Integer.class);
		return htComDao.getHtComById(id);
	}
	
	@ActionPermission(actionName = "getHtComStat",remark = "",permission=PermissionMethodType.MODULE)
	public ComStatModel getComStat(HttpServletRequest request){
		Integer id = ParaUtil.getPara(request, "id", Integer.class);
		return htComDao.getComStat(id);
	}
	
	
	@ActionPermission(actionName = "delHtComs",remark = "")
	@ParameterMapper({ @ParameterInfo(mapName = "ids", componentType = Integer.class, index = 0, mapType = ParameterClassType.ARRAY) })
	public boolean delHtComs(List<java.lang.Integer> ids){
		htComDao.delHtComs(ids);
		return true;
	}
	
	@ActionPermission(actionName = "getHtComsCount",remark = "")
	public int getHtComsCount(HtComModel htComModel) {
		return htComDao.getHtComsCount(htComModel);
	}
	
	
	@ActionPermission(actionName = "addHtBuild",remark = "")
	public java.lang.Integer addHtBuild(HtBuildModel htBuildModel, HttpServletRequest request) {
		return htBuildDao.addHtBuild(htBuildModel);
	}
	
	@ActionPermission(actionName = "chgHtBuild",remark = "")
	public void chgHtBuild(HtBuildModel htBuildModel, HttpServletRequest request) {
		htBuildDao.chgHtBuild(htBuildModel);
	}
	
	@ActionPermission(actionName = "delHtBuild",remark = "")
	public void delHtBuild(HtBuildModel htBuildModel, HttpServletRequest request) {
		htBuildDao.delHtBuild(htBuildModel);
	}
	
	@ActionPermission(actionName = "getHtBuilds",remark = "")
	public List<HtBuildModel> getHtBuilds(HtBuildModel htBuildModel, HttpServletRequest request) {
		return htBuildDao.getHtBuilds(htBuildModel, PageInfo.getPageInfo(request));
	}
	
	@ActionPermission(actionName = "delHtBuilds",remark = "")
	@ParameterMapper({ @ParameterInfo(mapName = "ids", componentType = Integer.class, index = 0, mapType = ParameterClassType.ARRAY) })
	public boolean delHtBuilds(List<java.lang.Integer> ids){
		htBuildDao.delHtBuilds(ids);
		return true;
	}
	
	@ActionPermission(actionName = "getHtBuildsCount",remark = "")
	public int getHtBuildsCount(HtBuildModel htBuildModel) {
		return htBuildDao.getHtBuildsCount(htBuildModel);
	}
	
	
	@ActionPermission(actionName = "addHtProp",remark = "")
	public java.lang.Integer addHtProp(HtPropModel htPropModel, HttpServletRequest request) {
		return htPropDao.addHtProp(htPropModel);
	}
	
	@ActionPermission(actionName = "chgHtProp",remark = "")
	public void chgHtProp(HtPropModel htPropModel, HttpServletRequest request) {
		htPropDao.chgHtProp(htPropModel);
	}
	
	@ActionPermission(actionName = "delHtProp",remark = "")
	public void delHtProp(HtPropModel htPropModel, HttpServletRequest request) {
		htPropDao.delHtProp(htPropModel);
	}
	
	@ActionPermission(actionName = "getHtProps",remark = "")
	public List<HtPropModel> getHtProps(HtPropModel htPropModel, HttpServletRequest request) {
		return htPropDao.getHtProps(htPropModel, PageInfo.getPageInfo(request));
	}
	
	@ActionPermission(actionName = "delHtProps",remark = "")
	@ParameterMapper({ @ParameterInfo(mapName = "ids", componentType = Integer.class, index = 0, mapType = ParameterClassType.ARRAY) })
	public boolean delHtProps(List<java.lang.Integer> ids){
		htPropDao.delHtProps(ids);
		return true;
	}
	
	@ActionPermission(actionName = "getHtPropsCount",remark = "")
	public int getHtPropsCount(HtPropModel htPropModel) {
		return htPropDao.getHtPropsCount(htPropModel);
	}
	}
